home *** CD-ROM | disk | FTP | other *** search
Wrap
on birth me return me end on FixAnsChan me global K1, K2, K3, K4, K5, RCLK set K1 to 1 set K2 to 2 set K3 to 3 set K4 to 4 set K5 to 5 set RCLK to K1 + 10 end on AltQ me global K1, K2, K3, K4, K5, JOBNAME, QN_D, TWNS, YY, MM, DD, ACTION, CASH, EXCF, SNAME, UNAME, CURR_S, J puppetSprite(6, 1) puppetSprite(7, 1) puppetSprite(8, 1) puppetSprite(9, 1) puppetSprite(10, 1) set the castNum of sprite (K1 + 5) to 9 set the castNum of sprite (K2 + 5) to 10 set the castNum of sprite (K3 + 5) to 11 set the castNum of sprite (K4 + 5) to 12 set the castNum of sprite (K5 + 5) to 13 if getLast(ACTION) contains "K" then set the text of field "Employer" to JOBNAME && "-" && getAt(QN_D, getLast(TWNS)) set the text of field "Date" to ReturnDate(me, YY, MM, DD) set R to getAt(CURR_S, getLast(TWNS)) set MC to integer(Infla(me, CASH / EXCF)) set the text of field "Money" to string(MC) && R set the text of field "Name" to SNAME && UNAME end if when keyDown then if the commandDown then SoundLevelAdjust(J) sound fadeOut 1, 100 end on WriteQ me, TT global JOBNAME, QN_D, TWNS, YY, MM, DD, ACTION, CASH, EXCF, SNAME, UNAME, TEXTANS, CURR_S if getLast(ACTION) contains "K" then set the text of field "Employer" to JOBNAME && "-" && getAt(QN_D, getLast(TWNS)) set the text of field "Date" to ReturnDate(me, YY, MM, DD) set R to getAt(CURR_S, getLast(TWNS)) set MC to integer(Infla(me, CASH / EXCF)) set the text of field "Money" to string(MC) && R set the text of field "Name" to SNAME && UNAME end if repeat with laba = 1 to 15 if the name of cast laba contains "Textsvar," then set TT to the text of cast laba end if end repeat set TEXTANS to TT set the text of field "AnswerText" to "Skriv inn svaret ditt her" hilite field "AnswerText" sound fadeOut 1, 100 end on NextQInit me global TMQS, LQP, PPNM, PNM, TWNS, LMXQ, LQNO, LQDS, PSND, ACTION, KTQR, KTQW, KTKM, PLAYER, MAXPSNDS, J set DR to getLast(ACTION) delete char 1 of DR set DR to value(DR) if getLast(ACTION) contains "D" then if LQP = count(TMQS) then set PPNM to the pathName & getLast(ACTION) & "Q0" else set LQP to LQP + 1 set MVN to getAt(TMQS, LQP) set PPNM to the pathName & getLast(ACTION) & "Q" & MVN FixAnsChan(me) end if else if getLast(ACTION) contains "K" then set KTKM to 100 * (KTQR + 0.0) / (KTQR + KTQW) if LQP = count(TMQS) then set PPNM to the pathName & getLast(ACTION) & "Q0" else set LQP to LQP + 1 set MVN to getAt(TMQS, LQP) set PPNM to the pathName & getLast(ACTION) & "Q" & MVN FixAnsChan(me) end if end if end if when keyDown then if the commandDown then SoundLevelAdjust(J) end on OpenMovieMethod me global RANS, PPNM, PNM, LMXQ, LQDS, CHN, TWNS, LQNO, PLAYER, SNAME, SEX, DTQR, DTQW, ACTION, CASH, LIVC, QPAY, PSND when keyDown then nothing sound stop CHN if getLast(ACTION) contains "K" then set QPAY to 0 end if if the movie contains "Q0" then if getLast(ACTION) contains "K" then if PLAYER then puppetSound(PSND) updateStage() end if go("LastQuest", the pathName & getLast(ACTION) & "FIX") else go(the frame + 1) if PLAYER then puppetSound(PSND) updateStage() end if go(1, FixPath(me, PNM & "MISC:GO_ALL")) end if else if PLAYER then puppetSound(PSND) updateStage() end if go(1, PPNM) end if end on AltAnsw me global RCLK puppetSprite(6, 0) puppetSprite(7, 0) puppetSprite(8, 0) puppetSprite(9, 0) puppetSprite(10, 0) set RA to 0 if the clickOn = RCLK then set RA to 1 end if if the clickOn = (RCLK - 5) then set RA to 1 end if Answ(me, RA) end on WriteAnsw me, P, K if K contains P then set RA to 1 else set RA to 0 end if Answ(me, RA) end on Answ me, RA global WANS, RANS, CASH, DTQW, QPAY, PNM, DTQR, KTQR, ACTION, EXCF, CURR_S, TWNS, KTQW, J if RA then if getLast(ACTION) contains "K" then set a to Infla(me, CASH / EXCF) set b to Infla(me, QPAY / EXCF) set CASH to CASH + QPAY set S to integer(Infla(me, CASH / EXCF)) set R to getAt(CURR_S, getLast(TWNS)) set KTQR to KTQR + 1 set P to b / 30 puppetSound("Cash1") updateStage() set T to the ticks + 70 repeat while T > the ticks set a to a + P set the text of field "Money" to string(integer(a)) && R WaitH(me, 2) end repeat set the text of field "Money" to string(S) && R puppetSound(0) delay(60) else if getLast(ACTION) contains "D" then set DTQR to DTQR + 1 end if end if sound playFile 1, FixPath(me, PNM & "SNDS:ALARMS:POS" & string(random(2)) & ".AIF") go("R") set RANS to RANS + 1 else if not RA then sound playFile 1, FixPath(me, PNM & "SNDS:ALARMS:NEG" & string(random(4)) & ".AIF") if getLast(ACTION) contains "K" then set KTQW to KTQW + 1 else if getLast(ACTION) contains "D" then set DTQW to DTQW + 1 end if end if set WANS to WANS + 1 go("W") end if end if when keyDown then if the commandDown then SoundLevelAdjust(J) if not (the movie contains "Q0") then NextQInit(me) end if end on DestFastClickGraduate me global DTQR, DTQW, L_RANS, RANS, WANS set DTQR to DTQR + L_RANS set DTQW to DTQW + 13 - L_RANS set RANS to RANS + L_RANS set WANS to WANS + 13 - L_RANS end on DayPay me global LIVC, CURR_S, CASH, PNM, TWNS, EXCF set h to (3.0 * LIVC / 4) + random(1.0 * LIVC / 4) set a to Infla(me, CASH / EXCF) set b to Infla(me, h / EXCF) set S to integer(a - b) if S < 0 then set S to 0 end if set R to getAt(CURR_S, getLast(TWNS)) set P to b / 30 set c to 0 set m to "Dagens kostnader:" & RETURN set the text of field "DayCost" to m & string(integer(b)) && R set CASH to CASH - h puppetSound(0) puppetSound("Cash2") updateStage() set T to the ticks + 60 repeat while T > the ticks set a to a - P set the text of field "Money" to string(integer(a)) && R WaitH(me, 2) end repeat set the text of field "Money" to string(S) && R set the text of field "DayCost" to m & string(integer(b)) && R NewDate(me) WaitH(me, 60) if CASH < 0 then when timeOut then nothing set CASH to 0 go(100) go("Black", FixPath(me, PNM & "SQ_DIR:BLACK")) abort() end if end on QuestSalery me global CURR_S, PNM, EXCF, CashInit, init, TWNS, KARM, DAYS, CASH, YY, MM, DD, PAY, QPAY, SNAME, UNAME, RANS, WANS sound playFile 1, FixPath(me, PNM & "SNDS:ALARMS:BELL" & random(3) & ".AIF") set R to getAt(CURR_S, getLast(TWNS)) set KARM to integer((100.0 * RANS / (RANS + WANS)) + 0.5) if DAYS > 20 then set gA to 2.33329999999999993 - (0.0133 * KARM) else set gA to 1.39999999999999991 end if set QPAY to integer((gA * PAY) - (gA * PAY / 10.0) + (2 * random(gA * PAY / 10.0))) set P to integer(Infla(me, QPAY / EXCF)) set the text of field "Pay" to "Denne oppgaven gir:" & RETURN & P && R end on QuitJob me global ACTION, PNM go(1, FixPath(me, PNM & "MISC:GO_ALL")) end on UpdateQ_Array me global LMXQ, LQP, TMQS repeat with P = LQP to LMXQ setAt(TMQS, P, getAt(TMQS, P + 1)) end repeat set LMXQ to LMXQ - 1 end on Infla me, P global YY if YY > 1995 then repeat with n = 1 to YY - 1995 set P to 104 * P / 100 end repeat end if return P end on Defla me, P global YY if YY > 1995 then repeat with n = YY - 1995 down to 1 set P to 100.0 * P / 104.0 end repeat end if return integer(P) end on NewDate me global YY, MM, DD, DAYS set DAYS to DAYS + 1 set DD to DD + 1 if DD > 31 then set MM to MM + 1 set DD to 1 if MM > 12 then set MM to 1 set YY to YY + 1 end if else if (MM = 2) or (MM = 4) or ((MM = 6) or (MM = 9)) or (MM = 11) then if (DD > 30) or ((MM = 2) and (DD > 28)) then set MM to MM + 1 set DD to 1 end if end if end if end on PutDate me, Y, m, D set Y to Y * 10000 set m to m * 100 return Y + m + D end on GetDate me, YMD set Y to YMD / 10000 set m to (YMD / 100) - (Y * 100) set D to YMD mod 100 return ReturnDate(me, Y, m, D) end on ReturnDate me, Y, m, D if m = 1 then set K to "januar" else if m = 2 then set K to "februar" else if m = 3 then set K to "mars" else if m = 4 then set K to "april" else if m = 5 then set K to "mai" else if m = 6 then set K to "juni" else if m = 7 then set K to "juli" else if m = 8 then set K to "august" else if m = 9 then set K to "september" else if m = 10 then set K to "oktober" else if m = 11 then set K to "november" else if m = 12 then set K to "desember" end if end if end if end if end if end if end if end if end if end if end if end if return string(D) && K && string(Y) end on TimeOutFix me set the timeoutKeyDown to 0 set the timeoutMouse to 0 set the timeoutPlay to 0 startTimer() end on UpdateLatestQ_Dir me, D, LQDS repeat with n = 15 down to 1 setAt(LQDS, n + 1, getAt(LQDS, n)) end repeat setAt(LQDS, 1, D) end on BeginH me global TWNS, QN_D, SNAME, UNAME, JOBNAME, SEX, PLAYER, PSND, PNM, MAXPSNDS, J, YY, MM, DD, CURR_S, CASH, EXCF, LQP, LQNO, LMXQ, PPNM, ACTION, PSND_NUM Q_TimeOutFix() when keyDown then if the commandDown then SoundLevelAdjust(J) set T to JOBNAME && "-" && getAt(QN_D, getLast(TWNS)) set the text of field "JobNameBig" to T set the text of field "Employer" to JOBNAME && "-" && getAt(QN_D, getLast(TWNS)) set the text of field "Date" to ReturnDate(me, YY, MM, DD) set R to getAt(CURR_S, getLast(TWNS)) set MC to integer(Infla(me, CASH / EXCF)) set the text of field "Money" to string(MC) && R set the text of field "Name" to SNAME && UNAME if SEX = 0 then set n to "nye" else set n to "nye" end if set T to "Vi ønsker vår nye medarbeider" & RETURN set T to T & UNAME && SNAME & " velkommen!" set the text of field "EmployMessage" to T go(the frame + 1) preLoadCast(900, the number of castMembers) if PLAYER then set PSND_NUM to the number of cast "SIL_PAUS.AIF" set PSND to "PAUS" & string(random(MAXPSNDS)) & ".AIF" importFileInto(cast PSND_NUM, FixPath(me, PNM & "SNDS:PAUS:" & PSND)) preLoadCast(PSND_NUM) end if end on FiredH me global SNAME, UNAME, K6, JOBNAME, ACTION, QN_K, JOBS, PLAYER, PNM, PSND, MAXPSNDS, J when keyDown then if the commandDown then SoundLevelAdjust(J) set K6 to 0 set K to "Du klarer deg ikke særlig godt," && UNAME & "." set K to K & RETURN & RETURN & "Du er oppsagt!" set the text of field "F_Message" to K set KK to getAt(QN_K, getLast(JOBS)) set RR to charToNum(char 1 of KK) set RRR to numToChar(RR - 32) delete char 1 of KK set KK to RRR & KK set T to "Arbeidsattest for:" && UNAME && SNAME & RETURN set T to T & "Yrke:" && KK & RETURN & RETURN set T to T & RETURN & RETURN & RETURN & RETURN set T to T & "Arbeidsattest kan ikke gis." set the text of field "Q_Message" to T set the text of field "Signature" to JOBNAME set the text of field "JobName" to JOBNAME if PLAYER then importFileInto(cast PSND, FixPath(me, PNM & "SNDS:PAUS:SIL_PAUS.AIF")) set PSND to "PAUS" & string(random(MAXPSNDS)) & ".AIF" importFileInto(cast "SIL_PAUS.AIF", FixPath(me, PNM & "SNDS:PAUS:" & PSND)) preLoadCast(PSND) end if end on LeaveKatQ me global TMQS, TWNS, TWNN, PNM, K6, KTKM, C_KTKM, EXPR, C_EXPR, ACTION, KTQR, KTQW, YY, MM, DD, LPDAY, DAYS, PSND, PLAYER, AUKT_JOBS set LPDAY to DAYS GraduateH(me) if (KTKM >= C_KTKM) and (EXPR >= C_EXPR) then set K6 to K6 + 5 set LASTJOB to getLast(ACTION) delete char 1 of LASTJOB append(AUKT_JOBS, value(LASTJOB)) end if set K to integer(KTQR + ((KTQW + 0.0) / 3)) append(ACTION, PutDate(me, YY, MM, DD)) append(ACTION, -1 * ((10000 * K) + (10 * KTKM) + K6)) set TMQS to 0 if PLAYER then puppetSound(PSND) end if updateStage() go(1, FixPath(me, PNM & "MISC:GO_ALL")) end on GraduateH me global KTQR, KTQW, KTKM, EXPR, ACTION, C_KTKM, C_EXPR, PNM, J when keyDown then if the commandDown then SoundLevelAdjust(J) set KTKM to integer(100 * (KTQR + 0.0) / (KTQR + KTQW)) set EXPR_OLD to 0 repeat with i = 1 to count(ACTION) - 2 if getAt(ACTION, i) = getLast(ACTION) then set EXPR_OLD to EXPR_OLD + (-1 * getAt(ACTION, i + 2) / 10000) end if end repeat set EXPR to integer(KTQR + (KTQW + (0.0 / 3)) + EXPR_OLD) if (KTKM >= C_KTKM) and (EXPR >= C_EXPR) then sound stop 1 sound stop 2 sound playFile 2, FixPath(me, PNM & "SNDS:ALARMS:FANFAR.AIF") end if end on CreditCardH me global CURR_S, TWNS, CASH, EXCF, SNAME, UNAME set R to getAt(CURR_S, getLast(TWNS)) set MC to integer(Infla(me, CASH / EXCF)) set the text of field "Money" to string(MC) && R set the text of field "Name" to SNAME && UNAME end on EmployLetterH me global SNAME, UNAME, KTKM, EXPR, LQNO, QN_K, QN_D, JOBNAME, TWNS, YY, MM, DD, ACTION, C_EXPR, C_KTKM set X5 to "Nei" set KK to getAt(QN_K, getLast(JOBS)) if (KTKM < C_KTKM) and (EXPR < C_EXPR) then set S to "er ennå ikke dyktig nok og har dessuten for lite erfaring til å klare yrket som" && KK else if (KTKM < C_KTKM) and (EXPR >= C_EXPR) then set S to "er ennå ikke dyktig nok, men har tilstrekkelig erfaring til å klare yrket som" && KK else if (KTKM >= C_KTKM) and (EXPR < C_EXPR) then set S to "synes å være meget dyktig, men har ikke erfaring nok til å klare yrket som" && KK else if (KTKM >= C_KTKM) and (EXPR >= C_EXPR) then set S to "er meget dyktig og har tilstrekkelig erfaring innenfor sitt ansvarsområde. Det er med glede vi i dag kan autorisere" && UNAME && SNAME && "som" && KK set X5 to "Ja" end if end if end if end if set T to "Arbeidsattest for:" && UNAME && SNAME & RETURN set T to T & "Yrke:" && KK & RETURN & RETURN set T to T & UNAME && SNAME && "har arbeidet hos oss siden den" set T to T && GetDate(me, getAt(ACTION, count(ACTION) - 1)) & ". " set T to T & UNAME && S & "." set T to T & RETURN & RETURN set T to T & "Vurdering dyktighet:" && string(integer(KTKM)) & "%" & RETURN set T to T & "Vurdering erfaring:" && string(EXPR) && "poeng" & RETURN set T to T & "Autorisert som" && KK & ":" && X5 set the text of field "Q_Message" to T set t2 to JOBNAME & RETURN set t2 to t2 & getAt(QN_D, getLast(TWNS)) && ReturnDate(me, YY, MM, DD) set the text of field "Signature" to t2 set the text of field "JobName" to JOBNAME end on WaitH me, TCK set T to the ticks + TCK repeat while T > the ticks end repeat end on FixPath me, thePath if the machineType = 256 then set takeAwaySign to ":" set putInSign to "\" set T to char 1 to 2 of thePath repeat with i = 3 to length(thePath) set TT to char i of thePath if TT = takeAwaySign then set T to T & putInSign next repeat end if set T to T & TT end repeat set thePath to T end if return thePath end on CacheNextFile me, nextFile ¨() nothing() end on SoundLevelAdjust me global PNM, gComputer_CD, gComputer_SL if the key = "0" then set the soundLevel to 0 else if the key = "1" then set the soundLevel to 1 else if the key = "2" then set the soundLevel to 2 else if the key = "3" then set the soundLevel to 3 else if the key = "4" then set the soundLevel to 4 else if the key = "5" then set the soundLevel to 5 else if the key = "6" then set the soundLevel to 6 else if the key = "7" then set the soundLevel to 7 else if the key = "W" then set HOTEL to 1 else if the key = "E" then set alert_message to "This file is:" & RETURN set alert_message to alert_message & the movie alert(alert_message) else if the key = "Q" then set DL_mess to "Er du sikker på at du vil avslutte BackPacker ?" & RETURN & RETURN set DL_mess to DL_mess & "Reisen din vil ikke bli lagret !" if the machineType <> 256 then set x_libbet to "BPXlib.MAC" else set x_libbet to "BPXlib.DLL" end if openXLib(FixPath(me, PNM & "MISC:" & x_libbet)) set DL_BOX_OBJ to MISC_X(mnew) DL_BOX_OBJ(mAnswer, DL_mess, EMPTY, "Ja", "Nei") set ans_DL_BOX to the result DL_BOX_OBJ(mdispose) closeXLib(FixPath(me, PNM & "MISC:" & x_libbet)) if ans_DL_BOX = "Ja" then set the colorDepth to gComputer_CD set the soundLevel to gComputer_SL go(1, FixPath(me, PNM & "MISC:GO_ALL")) end if end if end if end if end if end if end if end if end if end if end if end if end on CodeMachine me, Message, readnumber global CASH, SEX, SNAME, ACTION, DAYS, KARM, UNAME, YY, TRAVEL, PHONE_M if SNAME <> EMPTY then set ASCII to charToNum(char 1 of SNAME) else set ASCII to 9 end if if (count(ACTION) < 20) and (CASH < 4000) then set codenumber to YY + (length(SNAME) * integer(CASH)) + SEX + integer(KARM) + count(ACTION) - getAt(ACTION, 1) + 129 + ASCII + (3435 * DAYS) - TRAVEL + PHONE_M else if ((DAYS + count(ACTION)) >= 19) and ((DAYS + count(ACTION)) < 45) then set codenumber to length(SNAME) + (integer(CASH) * SEX) + integer(KARM) + count(ACTION) - getAt(ACTION, 3) + 469 - (2 * PHONE_M) - (456 * DAYS) - (24 * TRAVEL) else if (length(UNAME) + integer(CASH / 1000)) > 10 then set codenumber to (DAYS * integer(CASH) * 67) + 9 + count(ACTION) + ASCII + (2 * YY) - integer(KARM) + (TRAVEL * PHONE_M) + integer(KARM) else if (PHONE_M < 1500) and (CASH > 3000) then set codenumber to (DAYS * integer(CASH) * 63) + 9 + count(ACTION) + YY + (19 * integer(KARM)) - (320 * TRAVEL) - PHONE_M else set codenumber to (DAYS * integer(CASH) * 60) + count(ACTION) + YY + (19 * integer(KARM)) - (302 * TRAVEL) - PHONE_M + 56 end if end if end if end if if Message = "code" then return codenumber else if Message = "decode" then if readnumber = codenumber then return 1 else return 0 end if end if end if end